#include "widget.h"

#include <QApplication>

#include "server.h"
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    HttpServer* httpServer = HttpServer::getInstance();
    if(!httpServer->init())
    {
        qDebug() << "HTTP 服务器初始化失败!";
        return -1;
    }
    qDebug() << "HTTP 服务器初始化成功!";

    WebsocketServer* websocketServer = WebsocketServer::getInstance();
    if(!websocketServer->init())
    {
        qDebug() << "Websocket 服务器初始化失败!";
        return -1;
    }
    qDebug() << "Websocket 服务器初始化成功!";

    Widget w;
    w.show();
    return a.exec();
}
